﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace NewtonJsonObject
{
    public class ClassTest
    {
        public Wowo What { get; set; }
        public string World { get; set; }
    }

    public class Wowo
    {
        public string name { get; set; }
    }

    public class TestTest
    {
        public void Go()
        {
            var a = new ClassTest();
            a.World = "world";
            a.What = new Wowo()
                {
                    name = "hello"
                };

            var message = JsonConvert.SerializeObject(a);

            var obj = JsonConvert.DeserializeObject<ClassTest>(message);
        }
    }
}
